Fix Tags table scroll staying disabled after backgrounding - #973
Conversation
The POI Common Tags and All Tags tables could become permanently unscrollable. When the autocomplete completion overlay appears on iOS 26+, AutocompleteTextField disables the enclosing table view's scrolling so the overlay owns it, restoring it only when the overlay is torn down. If the app resigned active (e.g. switching to Safari) while the overlay was showing, the teardown path never ran and the Tags table was left with isScrollEnabled = false. Dismiss the completion overlay on UIApplication.willResignActive so scrolling is restored before backgrounding, and defensively re-enable the enclosing table view's scrolling when editing ends. Fixes bryceco#867
410120a to
f757d04
Compare
|
Rebased onto master -- f757d04. Worth noting what moved. This branch patched Separately, the That's the runner's simulator list not matching the workflow's destination, which usually means the macOS image rotated its installed simulators. Nothing here touches build or test configuration -- it's one file. I didn't touch the destination specifier since that's a repo-wide CI change, but happy to send it separately if you want it. I can't run the iOS test suite locally, so this is |
|
You can ignore the fact that GitHub's CI tests fail, since they fail for reasons unrelated to project code. |
|
Fixed upstream in a slightly different way. Thanks! |
What
Fixes the POI tag tables (Common Tags and All Tags) becoming permanently unscrollable, as reported when switching to another app mid-edit and coming back.
Why
When the autocomplete completion overlay appears on iOS 26+,
AutocompleteTextFieldsets the enclosing table view'sisScrollEnabled = falseso the overlay owns scrolling. That flag is only restored totruein the overlay teardown branch ofupdateCompletionTableView().If the app resigns active (for example switching to Safari) while the overlay is showing, the field can lose its editing state without the teardown path ever running, so the Tags table is left stuck at
isScrollEnabled = falseand never scrolls again. That matches the reported repro of switching to Safari and back.Change
UIApplication.willResignActiveNotification(registered alongside the existing keyboard observers, removed by the existingdeinit), so scrolling is restored before the app backgrounds. The handler is guarded onfilteredCompletionsbeing non-empty, so fields without an active overlay do nothing and inactive tables are not disturbed when the app switcher or control center is opened.textFieldDidEndEditingas a belt-and-suspenders restore.The fix is confined to
AutocompleteTextField.swift, the only place that disables the parent table's scrolling.Fixes #867